package dongshi.daddy.visitor;

import dongshi.daddy.visitor.objectstructure.BigHuYouCompany;
import dongshi.daddy.visitor.visitor.LiveAppVisitor;
import dongshi.daddy.visitor.visitor.SocialAppVisitor;
import org.junit.Test;

public class VisitorClient {

    @Test
    public void startProject() {
        System.out.println("-----------------启动社交APP项目--------------------");
        BigHuYouCompany bigHuYouDoSocialApp= new BigHuYouCompany(new SocialAppVisitor());
        //可以很轻松的更换Visitor，但是要求BigHuYouCompany的结构稳定
        bigHuYouDoSocialApp.startProject();
        System.out.println("-----------------启动短视频APP项目--------------------");
        BigHuYouCompany liveAppVisitor= new BigHuYouCompany(new LiveAppVisitor());
        liveAppVisitor.startProject();
    }
}
